#!/bin/bash

## Problem:
# When run demo, give error cgo argument has Go pointer to Go pointer
# need libicu56

. bases/base.sh

GOQTDIR=$GOPATH/src/github.com/salviati/go-qt5

if [ ! -d $GOQTDIR ]; then
    go get github.com/salviati/go-qt5
fi

which lua &> /dev/null
if [ $? -ne 0 ]; then
    install_tools lua5.1
fi

cd $GOQTDIR/make
lua make.lua
lua makelib.lua

cd ../goqtdrv5
qmake "CONFIG+=release"
make
$SUDO make install

cd ../qt5
go install
